FROM amd64/node:20-alpine3.21
RUN adduser -D -g rcedu -u 1002 rcedu && \
    mkdir -p /opt/rcedu/console && \
    chown -R rcedu:rcedu /opt/rcedu/console
WORKDIR /opt/rcedu/console
COPY . /opt/rcedu/console
RUN mv server/uat.config.yaml server/prod.config.yaml
USER rcedu
EXPOSE 8000
CMD ["npm", "run", "serve"]